import pandas as pd
import numpy as np
import datetime
from datetime import datetime
from collections import OrderedDict
from chart.charts import *
import matplotlib as mpl
import matplotlib.pyplot as plt


x1=OrderedDict([('20160215', 0), ('20160216', 1), ('20160217', 1), ('20160218', 1), ('20160219', 4), ('20160222', 2), ('20160223', 3), ('20160224', 2), ('20160225', 1), ('20160226', 1), ('20160229', 1), ('20160301', 2), ('20160302', 4), ('20160303', 0), ('20160304', 4), ('20160308', 5), ('20160309', 5), ('20160310', 1)])
x2=OrderedDict([('20160215', 4), ('20160216', 1), ('20160217', 1), ('20160218', 7), ('20160219', 5), ('20160222', 3), ('20160223', 2), ('20160224', 6), ('20160225', 5), ('20160226', 11), ('20160229', 8), ('20160301', 8), ('20160302', 5), ('20160303', 9), ('20160304', 4), ('20160308', 4), ('20160309', 6), ('20160310', 3)])
x3=OrderedDict([('20160215', -4.0), ('20160216', -1.0), ('20160217', -1.0), ('20160218', -3.0), ('20160219', -4.0), ('20160222', 6.0), ('20160223', -3.0), ('20160224', -2.0), ('20160225', -1.0), ('20160226', -15.0), ('20160229', -14.0), ('20160301', -8.0), ('20160302', 3.0), ('20160303', -10.0), ('20160304', 1.0), ('20160308', -13.0), ('20160309', -2.0), ('20160310', -6.0)])

ShowDetailChart(x1, x2, x3)
'''
fig, (ax1) = plt.subplots(1, sharex=True)
pd.set_option('display.notebook_repr_html', False)
pd.set_option('display.max_columns', 10)
pd.set_option('display.max_rows', 10)
seedval = 111111
np.random.seed(seedval)
s = pd.Series(np.random.randn(1096), index=pd.date_range('2012-01-01', '2014-12-31'))
walk_ts = s.cumsum()
walk_ts = pd.DataFrame(walk_ts)
# pd.options.display.mpl_style = 'default'

np.random.seed(seedval)
df = pd.DataFrame(np.random.randn(1096, 3),index=walk_ts.index, columns=list('ABZ'))
walk_df = df.cumsum()
# walk_df.head()

plt.xlabel('Time')
plt.ylabel('Money')

walk_ts.plot(label = "line 1", ax=ax1, color='black')
walk_df.plot(label = "line 1", ax=ax1, title='Title of the Chart')
plt.show()
'''